package com.woniuxy.project115.kaer.mall.service;

import com.woniuxy.project115.kaer.mall.entity.ProductInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.project115.kaer.mall.param.AddProductParam;
import com.woniuxy.project115.kaer.mall.param.FindProductParam;
import com.woniuxy.project115.kaer.mall.param.PageParam;
import com.woniuxy.project115.kaer.mall.util.PageInfo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lyc
 * @since 2025年02月17日
 */
public interface ProductInfoService extends IService<ProductInfo> {

    PageInfo findProductByCondition(FindProductParam param,String role);

    void addProduct(AddProductParam bean) throws Exception;

    void addProductNumber(Integer productId, Integer number) throws Exception;

    void upProduct(Integer productId)throws Exception;

    Integer collectProduct(Integer productId, Integer userId)throws Exception;

    PageInfo selectCollect(PageParam bean, Integer userId)throws Exception;

    PageInfo selectShopping(PageParam bean, Integer userId);

    void delShopping(Integer userId, Integer productId, Integer number) throws Exception;

    void changNumber(Integer userId, Integer productId, Integer number) throws Exception;

    List<ProductInfo> selectCollectRank();
}
